home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #1
/
Amiga Plus CD - 1996 - No. 1.iso
/
pd
/
grafik
/
dust_v2.34
/
dusthelp2
/
cdeform
< prev
next >
Wrap
Text File
|
1995-09-28
|
5KB
|
88 lines
COMMAND CDEFORM
-----------------------------------------------------------------
Purpose: Deform a curve of an object to fit a curve of another
object. This the "Allround-effect" of Dust. You can
create morphs in high-quality, animated boolean
effects, ... using this command.
Usage: CDEFORM(<src-object>,<dest-object>,<sg1>,<sg2>,<round>[,2 control-curves])
<sg1> and <sg2> are the names of two subgroups defining
the curve. Both objects have to contain these subgroups.
The curves are build from the list of boundary-edges.
All boundary-edges which are found in both subgroups
are taken to build the curve.
If you are able to define the curve using one subgroup
then specify "" or "NONE" for the second one.
If your second subgroup is the whole object specify
"MAIN" or "DEFAULT" without defining this subgroup.
The <round>-parameter specifies which points are
interpolated and which are taken directly from the
destination-object. Interpolated points which have
a relative distance less than <round> from
a destination point are turned in this destination-point.
Values from 0.0 (interpolate all points) to 1.0 (interpolate
no points) are possible.
The optional 4 parametes "2 control-curves" are the
names of 4 subgroups which define two control-curves
which are taken to search the startpoint for closed
curves.
Examples: cdeform(1,2,G1,G2,0.0)
cdeform(1,2,G1,,0.2)
cdeform(1,2,G1,MAIN,0.1)
Notes: 1. You may ask: What are curves in my polygon-object ?
In fact Dust moves some points of the source object
to the location of some points of the destination-
object. To get a smooth behavior without turning
polygons sorted curves are needed. If the point-count
of the source-object is greater than the one of the
destination-object the remaining points are interpolated
linear using this curves.
2. Both curves must be of the same type (open or closed)
3. Now you can morph a closed head into a sphere,
a face into a plane, a torus with 12x5 points into
a torus with 12*24 points in the highest quality
you can imagine.
4. In the most cases you will need two subgroups to define
your curve exactly.
5. If you deform some neighbour-curves it can happen
that the faces become turned. In this case you have two
choices:
a) use the STARTPCORR-parameter
Example:
You morphed four curves:
CDEFORM(1,2,G1,"",0.0)
CDEFORM(1,2,G2,"",0.0)
CDEFORM(1,2,G3,"",0.0)
CDEFORM(1,2,G4,"",0.0)
The triangles between the 2nd and the 3rd curve
are turned in the same direction, the triangles between
the 3rd and the 4th curve are turned in the opposite
direction. Then try the STARTPCORR-parameter on the
3rd curve:
SET(STARTPCORR,0)
CDEFORM(1,2,G1,"",0.0)
SET(STARTPCORR,0)
CDEFORM(1,2,G2,"",0.0)
SET(STARTPCORR,1)
CDEFORM(1,2,G3,"",0.0)
SET(STARTPCORR,0)
CDEFORM(1,2,G4,"",0.0)
If the result are now better try a higher value to find
the optimum otherwise use negative values.
b) use control-curves
The control curves always are the neighbour and
the previous neighbour-curve:
CDEFORM(1,2,G1,"",0.0)
CDEFORM(1,2,G2,"",0.0)
CDEFORM(1,2,G3,"",0.0,G2,"",G1,"")
CDEFORM(1,2,G4,"",0.0)
No doubt, the control-curves are the better choice
but always you need 2 previous curves !
6. see also CDEFORMINTERP, EXPANDSG, SHRINKSG and
PREFS (INTERPMODE, FORCESWAP, STARTPCORR)